package cn.hchaojie.camp.day06;

import org.junit.Test;

import cn.hchaojie.camp.day06.Shape.Color;
import cn.hchaojie.camp.day06.Shape.Point;

public class TestShape {
	// 演示内部类的创建
	@Test
	public void test() {
		Shape shape = new Shape();
		
		// 创建内部类对象之前，必须先有一个外部类的对象
		Point p = shape.new Point();
		
		Point p1 = new Shape().new Point();
		
		p1.print();
		
		// 创建静态内部类对象之前，不需要创建外部类对象
		Color color = new Color();
		Shape.Color color2 = new Shape.Color();
		
		
	}
	
	@Test
	public void testAccess() {
		Shape shape = new Shape();
		int i = shape.type;
	}
}
